package com.xk._01基础篇._13优先级队列PriorityQueue;

import com.xk._01基础篇._13优先级队列PriorityQueue.model.Person;
import com.xk._01基础篇._13优先级队列PriorityQueue.queqe.PriorityQueue;

/**
 * @description:
 * @author: xu
 * @date: 2022/9/29 20:39
 */
public class Main {
    public static void main(String[] args) {
        PriorityQueue<Person> queue = new PriorityQueue<>();
        queue.enQueue(new Person("jack", 2));
        queue.enQueue(new Person("rose", 10));
        queue.enQueue(new Person("jake", 5));
        queue.enQueue(new Person("jams", 15));

        while (!queue.isEmpty()) {
            System.out.println(queue.deQueue());
        }
    }
}
